﻿/************************************************
 * Copyright (C) 2011 东北农业大学(NEAU)
 * 版权所有。
 * 文件名：ContactsDetailList.aspx.cs
 * 版本号：v1.0
 * 文件功能描述：通讯录的详细信息功能
 * 作者：侯建
 * 创建日期：2011.04.11
************************************************/
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Jxym.DBUtility;

namespace Jxym.wlkc2011.Module.Default.server.Contacts
{
    public partial class ContactsDetailList : System.Web.UI.Page
    {
        MsSqlDal<model.Contacts> ictt = new MsSqlDal<model.Contacts>();
        //MsSqlDal<model.Contacts> ictt = new MsSqlDal<model.Contacts>();
        MsSqlDal<model.ContactsType> ictte = new MsSqlDal<model.ContactsType>();
        //MsSqlDal<model.ContactsType> ictte = new MsSqlDal<model.ContactsType>();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.Params["id2"] != null)
                {
                    int id = Convert.ToInt32(Request.Params["id2"]);
                    model.Contacts cttModel = ictt.GetModel("ID = " + id, null);
                    this.lblContactsName.Text = cttModel.ContactsName;
                    this.lblContactsSex.Text = cttModel.ContactsSex == true?"男":"女";
                    this.lblContactsCall.Text = cttModel.ContactsCall;
                    this.lblContactsQQ.Text = cttModel.ContactsQQ.ToString();
                    this.lblContactsMSN.Text = cttModel.ContactsMSN;
                    this.lblContactsEmail.Text = cttModel.ContactsEmail;
                    this.lblContactsPhone.Text = cttModel.ContactsPhone;
                    this.lblContactsCellPhone.Text = cttModel.ContactsCellPhone;
                    this.lblContactsFax.Text = cttModel.ContactsFax;
                    this.lblContactsAddress.Text = cttModel.ContactsAddress;
                    this.lblContactsCode.Text = cttModel.ContactsCode;
                    this.lblContactsURL.Text = cttModel.ContactsURL;
                    this.lblContactsBirthday.Text = cttModel.ContactsBirthday.ToString("yyyy-MM-dd");
                    this.lblContactsRemark.Text = cttModel.ContactsRemark;
                    this.lblContactsType.Text = ictte.GetModel("ContactsTypeID = " + Convert.ToInt32(cttModel.ContactsType), null).ContactsTypeName;
                }
            }
        }
    }
}